<?php
include "connectStoreDB.php";

$item=$_POST["item"];
$type=$_POST["type"];
$number=$_POST["number"];
$sell_p=$_POST["sell_p"];
$buy_p=$_POST["buy_p"];

$sql="INSERT INTO inventory VALUES ('$item','$type',$number,$sell_p,$buy_p)";

mysqli_query($conn, $sql);
echo "$item added!";

//close connection
mysqli_close($conn);

//redirect back to admin page
header("location:adminpage.php");
?>